package com.vitech.javacertification.oo;

class CovariantMotherFucker {

	static int i;

	Object test() {
		System.out.println("Method from Mother called ...");
		return 999;
	}

	CovariantMotherFucker() {

		System.out.println("Constructor from CovariantMotherFucker");

	}

}

class CovariantBastandSon extends CovariantMotherFucker {

	Integer test() {

		System.out.println("Method from the Bastard Son called ...");
		return i;

	}

	public static void main(String[] args) {

		CovariantBastandSon son = new CovariantBastandSon();
		System.out.println("Covariant bastard son return = " + son.test());
		
		CovariantMotherFucker mother = new CovariantBastandSon();
		
		mother.test();
		
		
	}

}